/*
 * Copyright (c) novafaen design 2009 
 */
package tentaflykt.util;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * Utility package resource reader.<br>
 * Resource file: tentaflykt.util.<b>utility.properties</b>
 * @author Kristoffer Nilsson
 */
public class UtilRes {
  private static ResourceBundle RESOURCE_BUNDLE = 
    ResourceBundle.getBundle("tentaflykt.util.utility");
  
  /**
   * Get value string from default resource file.
   * @param key The key name
   * @return The key value
   */
  public static String getString(String key) {
    try {
      return RESOURCE_BUNDLE.getString(key);
    } catch (MissingResourceException ex) {
      return "!" + key + "!";
    }
  }
  
  /**
   * Get the <code>ResourceBundle</code> used within this resource.
   * @return The <code>ResourceBundle</code>
   */
  public static ResourceBundle getResourceBundle() {
    return RESOURCE_BUNDLE;
  }
}
